package com.zzy.demo.enums;

import com.zzy.cms.common.reuslt.IResultCode;

import lombok.AllArgsConstructor;

/**
 * 自定义异常
 *
 * @author weiyuan
 * @date 20231226
 */
@AllArgsConstructor
public enum BusinessResultCode implements IResultCode {

    /**
     * 异常代码示例
     * 异常代码规则：系统标示[TOPDP]+模块名[T0001]+序号[0001]
     */
    TOPDP_T0001("数据库查询异常", "TOPDPT00010001", "TOPDPT00010001"),

    ;

    /**
     * 异常编码
     */
    final String msg;
    /**
     * 业务编码
     */
    final String code;
    /**
     * 编码描述信息
     */
    final String businessCode;


    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    public String getBusinessCode() {
        return businessCode;
    }
}
